﻿using System.Collections.Generic;
using Core.Library;

namespace Core.AdminGroupUser
{
    public class AdminGroupUserController
    {
        public List<AdminGroupUserObject> GetGroupsByUserId(int userId)
        {
            return ObjectHelper.FillCollection<AdminGroupUserObject>((new AdminGroupUserDAL()).GetGroupsByUserId(userId));
        }

        public void Create(int groupId, int userId)
        {
            (new AdminGroupUserDAL()).Create(groupId, userId);
        }

        public void DeleteByUserId(int userId)
        {
            (new AdminGroupUserDAL()).DeleteByUserId(userId);
        }           
    }
}